package com.surveillance.DAO;

import java.util.Date;
import java.util.List;
import org.springframework.stereotype.Repository;
import com.surveillance.util.CustomHibernateDaoSupport;

import com.surveillance.entities.Examen;

@Repository("ExamenDAO")
public class ExamenDao extends BaseDao<Examen> {
	public List getExamensByNiveauSpec(int niveau, boolean isMedecine) {
		return getHibernateTemplate().find(
				"from Examen where niveau = " + niveau + " and isMedecine = "
						+ isMedecine);
	}
	
	public List getDatesDesExamen(Date dateDebut,Date dateFin){
		return getHibernateTemplate().find(
				"from Examen where dateDebut >= '" + dateDebut + "' and dateFin <= '"
						+ dateFin+"\'");
	}

}
